﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="shopsum.aspx.cs" Inherits="Html5.shopsum" %>


<%@ Register Src="~/footer.ascx" TagName="Foot" TagPrefix="uc2" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <title><%= SectionProxyData.GetSetValue(3) %></title>

    <link type="text/css" rel="stylesheet" href="/css/style.css" />
    <link type="text/css" rel="stylesheet" href="/css/page.css" />
    <link href="../css/shopcenter.css" rel="stylesheet" />
    <link href="/css/mobiscroll.custom-2.17.0.min.css" rel="stylesheet" type="text/css" />
    <script src="../javascript/jquery-1.11.1.min.js"></script>

    <script src="/javascript/mobiscroll.custom-2.17.0.min.js" type="text/javascript"></script>



    <style type="text/css">
        .bom_menu .icon-order {
            background-image: url(/images/ico_b_order_cur.png);
        }

        #page_title .top_shop {
            background: url(/images/shop_top_search.png) no-repeat;
            height: 32px;
            width: 32px;
            background-size: 100% 100%;
            margin-top: 5px;
        }

        .index_class ul li div {
            background-color: #fff;
            padding-top: 0px;
        }
        .sum_border_bottom {
            border-bottom:solid #ddd 1px;
        }
        .sum_border_right {
            border-right:solid #ddd 1px;
        }

        .index_class ul li {
            width:49.8%;
        }
    </style>


</head>
<body>
    <div class="page">

        <div id="page_title">
            <a href="index.aspx" id="back" class=" top_left" data-ajax="false"><span style="padding-left:15px; width:50px; position:absolute;top:-10px; font-size:14px; ">返回</span></a>
            <h1>统计结算</h1>

        </div>

        <div class="container ">

            <div id="searchbox">

                <ul class="my_order_list">
                    <li>
                        <div class="order-tit">
                            <span class="time"><strong>开始时间</strong>
                                <input type="text" runat="server" id="tbstarttime" class="w_txt" placeholder="请输入开始时间" />
                            </span>
                        </div>

                        <div class="order-tit" style="border-bottom: none; padding: 0;">
                            <span class="time"><strong>结束时间</strong>
                                <input type="text" runat="server" id="tbendtime" class="w_txt" placeholder="请输入结束时间" />
                            </span>
                        </div>


                    </li>
                </ul>

                <div class="order-tit">
                    <div class="view_back_con">
                        <input type="submit" value="搜索" onclick="searchorder()" class="view_back_btn" data-ajax="false" />
                    </div>
                </div>
            </div>
            <div class=" index_class" style="margin-bottom:10px;">

                <asp:Repeater runat="server" ID="rptsum">
                    <ItemTemplate>
                        <ul class="swiper-slide">

                            <li class="sum_border_bottom sum_border_right">
                                <div>
                                    <p>
                                        <span>订单：<label><%# Eval("OrderCount")%></label>个</span>
                                    </p>

                                </div>
                            </li>

                             <li class="sum_border_bottom">
                                <div>
                                    <p>
                                        <span style="margin-left: 10px;">配送费：￥<label><%# Eval("shopdiscountmoney")%></label></span>
                                    </p>

                                </div>
                            </li>

                            <li class="sum_border_right">
                                <div>
                                    <p>
                                        <span style="margin-left: 10px;">佣金：￥<label><%# Eval("Commission")%></label></span>
                                    </p>

                                </div>
                            </li>

                            <li>
                                <div>
                                    <p>
                                        <span style="margin-left: 10px;">未对账：￥<label><%# Eval("cardpay")%></label></span>
                                    </p>

                                </div>
                            </li>

                        </ul>

                    </ItemTemplate>
                </asp:Repeater>

            </div>


            <ul class="my_order_list">
                <asp:Repeater runat="server" ID="rptorder">
                    <ItemTemplate>
                        <li>
                            <a href="showtogoorder.aspx?id=<%# Eval("orderid") %>" data-ajax="false">
                                <div class="order-tit">
                                    <span class="time"><%# Eval("OrderDateTime")%></span>
                                    <span class="state"><%# WebUtility.TurnOrderState(Eval("OrderStatus")) %></span>
                                </div>
                                <div class="order-info">
                                    <p class="f14">订单编号：<span class="red"><%# Eval("orderid") %></span></p>
                                    <p class="grey">配送费：￥<%# Eval("shopdiscountmoney")%></p>
                                    <p class="grey">代收金额：￥<%# Eval("advance")%></p>
                                </div>
                            </a>


                        </li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>

            <div class="con-btn" id="pages" runat="server" >
            </div>
        </div>
    </div>
</body>
</html>
<script src="../javascript/jCommon.js"></script>

<script type="text/javascript">

    function searchorder() {
        var url = "shopsum.aspx?a=1";
        var tbkey = $.trim($("#tbstarttime").val());
        if (tbkey.length > 0) {
            url += "&starttime=" + tbkey;
        }

        var ddlstate = $.trim($("#tbendtime").val());
        if (ddlstate != "-1") {
            url += "&endtime=" + ddlstate;
        }

        window.location = url;

    }

    $(document).ready(function () {
        var tbkey = request("starttime")
        if (tbkey.length > 0) {
            $("#tbstarttime").val(tbkey)
        }
        var state = request("endtime")
        if (state.length > 0) {
            $("#tbendtime").val(state);
        }

        var ndate = new Date();

        console.log(ndate.getYear());

        $('#tbstarttime').mobiscroll().date({
            theme: $.mobiscroll.defaults.theme,     // Specify theme like: theme: 'ios' or omit setting to use default 
            mode: "scroller",       // Specify scroller mode like: mode: 'mixed' or omit setting to use default 
            display: "modal", // Specify display mode like: display: 'bottom' or omit setting to use default 
            lang: "zh"      // Specify language like: lang: 'pl' or omit setting to use default

        });

        $('#tbendtime').mobiscroll().date({
            theme: $.mobiscroll.defaults.theme,     // Specify theme like: theme: 'ios' or omit setting to use default 
            mode: "scroller",       // Specify scroller mode like: mode: 'mixed' or omit setting to use default 
            display: "modal", // Specify display mode like: display: 'bottom' or omit setting to use default 
            lang: "zh"     // Specify language like: lang: 'pl' or omit setting to use default

        });


    });



</script>
